package com.cmcc.groupcontacts.common;

import com.yinhai.map.ServiceMap;
import com.yinhai.util.UuId;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * 程序启动接收器
 * 
 * @author 
 * 
 */
public class BootReceiver extends BroadcastReceiver {
	private static final String LOG_TAG = "BootReceiver";
	
	@Override
	public void onReceive(Context context, Intent intent) {
		if (!CoreService.isRunning) {
			Log.v(LOG_TAG, "手机自启动核心服务");
			Intent intent1 = new Intent(context, CoreService.class);
			ServiceMap.getMap().put(UuId.getUUID(), intent1);
			context.startService(intent);
		}
	}
}
